{% extends "base.html" %}
{% load static %}
{% block content%}

<div class="content-wrapper">
    <div class="content-header">
        <div class="container-fluid">
            <div>
                <div class="row">
                    <div class="col-sm-6">
                        <h1 class="m-0">
                            商品模块                    <small>列表</small>
                        </h1>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="/admin/index/index.html">Home</a></li>
                            <li class="breadcrumb-item active"><a href="/admin/Article/index.html">商品模块</a></li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--内容开始-->
    <section class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-12 search-collapse">
                    <form id="search_form">
                        <div class="select-list">
                            <ul>
                                <li>
                                    <label>分类： </label>
                                    <select id="search_cate_id" name="cate_id">
                                        <option value="">所有</option>
                                        <option value="1">关于我们</option>
                                        <option value="2">|&mdash; 公司介绍</option>
                                        <option value="3">|&mdash; 公司文化</option>
                                        <option value="4">新闻中心</option>
                                        <option value="5">|&mdash; 公司新闻</option>
                                        <option value="6">|&mdash; 行业资讯</option>
                                        <option value="7">资质荣誉</option>
                                        <option value="8">产品中心</option>
                                        <option value="9">|&mdash; 精选产品</option>
                                        <option value="10">|&mdash; 热销产品</option>
                                        <option value="11">资料下载</option>
                                        <option value="12">优秀团队</option>
                                        <option value="13">联系我们</option>
                                    </select>
                                </li>
                                <li>
                                    <label>标题： </label>

                                    <input type="text" id="search_title" name="title" value="" />
                                </li>
                                <li>
                                    <label>状态： </label>
                                    <select id="search_status" name="status">
                                        <option value="">所有</option>
                                        <option value="1">显示</option>
                                        <option value="0">隐藏</option>
                                    </select>
                                </li>
                                <li>
                                    <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                    <a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fas fa-sync-alt"></i>&nbsp;重置</a>
                                    <input class="hide" type="submit" name="btnSave" value="提交" onclick="$.table.search();return false;" />
                                </li>
                            </ul>
                        </div>
                    </form>
                </div>

                <div class="col-sm-12 select-table table-striped">
                    <div class="btn-group-sm" id="toolbar" role="group">
                        <a class="btn btn-success" onclick="$.operate.add()">
                            <i class="fa fa-plus"></i> 新增
                        </a>
                        <a class="btn btn-primary single disabled" onclick="$.operate.edit()">
                            <i class="fa fa-edit"></i> 修改
                        </a>
                        <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
                            <i class="fa fa-times"></i> 删除
                        </a>
                        <a class="btn btn-warning" onclick="$.table.export()">
                            <i class="fa fa-download"></i> 导出
                        </a>
                    </div>
                    <table id="bootstrap-table" data-mobile-responsive="true"></table>
                </div>
            </div>
        </div>
    </section>

    <div class="col-sm-12 main">
        <br>
        <div class="panel panel-primary">

            <div class="panel-body">
                <table class="table table-bordered table-condensed table-striped table-hover">
                    <thead>
                        <tr>
                            <th>姓名</th>
                            <th>邮件</th>
                            <th>薪水</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for per in members %}
                        <tr>
                            <td>{{ per.member_id }}</td>
                            <td>{{ per.username }}</td>
                            <td>{{ per.truename }}</td>
                        </tr>
                        {% empty %}
                        <tr>
                            <td colspan="7">无相关记录！</td>
                        </tr>
                        {% endfor %}
                    </tbody>
                </table>


            </div>
        </div>
    </div>

    <nav aria-label="Contacts Page Navigation">
        <ul class="pagination justify-content-center m-2">
            {% if curr_page > 1 %}
            <li class="page-item">
                <a class="page-link" href="?page=1">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            {% endif %}

            {% for pg in total_page %}
            {% if curr_page == pg %}
            <li class="page-item active">
                <a class="page-link" href="?page={{pg}}">{{ pg }}</a>
            </li>
            {% else %}
            <li class="page-item">
                <a class="page-link" href="?page={{pg}}">{{ pg }}</a>
            </li>
            {% endif %}
            {% endfor %}


            {% if curr_page < total_page|length %}
            <li class="page-item">
                <a class="page-link" href="?page={{ total_page|length }}">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
            {% endif %}
        </ul>
    </nav>
</div>
{% endblock %}